<?php

namespace App\Admin\Extensions\Tools;

use Encore\Admin\Admin;
use Encore\Admin\Grid\Tools\AbstractTool;
use Illuminate\Support\Facades\Request;

class Back extends AbstractTool
{
    protected function script()
    {
        return <<<EOT

$('.btn-back').click(function () {
    window.history.back();
});

EOT;
    }

    public function render()
    {
        Admin::script($this->script());
        return view('admin.tools.back', []);
    }
}